package easyjava.qixi.bean;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Table(name = "education")
@Entity
public class Education {
	@Id
	@Column(name = "id")
	private int id;
	@Column(name = "school")
	private String school;
	@Column(name = "major")
	private String major;
	@Column(name = "degree")
	private String degree;
    @OneToOne
    @JoinColumn(name="user_id")
	private User eUser;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getSchool() {
		return school;
	}
	public void setSchool(String school) {
		this.school = school;
	}
	public String getMajor() {
		return major;
	}
	public void setMajor(String major) {
		this.major = major;
	}
	public String getDegree() {
		return degree;
	}
	public void setDegree(String degree) {
		this.degree = degree;
	}
	
	public User geteUser() {
		return eUser;
	}
	public void seteUser(User eUser) {
		this.eUser = eUser;
	}
	@Override
	public String toString() {
		return "Education [id=" + id + ", school=" + school + ", major=" + major + ", degree=" + degree + ", userId="
				+ eUser.getId() + "]";
	}
    
}
